import React from 'react';
import "./index.css";

export default class ImageBox extends React.Component{
    constructor (props)
    {
      super();
      this.state={
            img:props.src,
            msg:props.msg,
            opacity:props.opacity,
            width:props.width,
            height:props.height
        }
    };
    render(){
        return (
            <div className="ImageBox_Container" style={{width:this.state.width,height:this.state.height}}>
                <img alt="ImageBox_Container" src={this.state.img} className="ImageBox_Img"/>
                <div className="ImageBox_Msg" style={{opacity:this.state.opacity}}>{this.state.msg}</div>
            </div>
        );
    }
}